package com.wiscamp.ninechapters.panels.application.vo;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import cube.ddd.application.ViewObject;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * 用户表
 */
@Data
public class UserVO implements ViewObject {

    /**
     * 用户编号
     */
    private Long userId = 0L;

    /**
     * 应用编号
     */
    private Long applicationId = 0L;

    /**
     * 用户代码
     */
    private String userCode = "";

    /**
     * 用户姓名
     */
    private String userName = "";

    /**
     * 用户类型编号
     */
    private Long userTypeId = 0L;

    /**
     * 账号类型编号
     */
    private Long accountTypeId = 0L;

    /**
     * 加密口令
     */
    private String password = "";

    /**
     * 关联账户编号
     */
    private Long referenceId = 0L;

    /**
     * 关联账户代码
     */
    private String referenceCode = "";

    /**
     * 组织机构编号
     */
    private Long organizationId = 0L;

    /**
     * 成员编号
     */
    private Long personId = 0L;

    /**
     * 邮箱
     */
    private String email = "";

    /**
     * 手机号码
     */
    private String cellphone = "";

    /**
     * 备注
     */
    private String remark = "";

    /**
     * 创建用户
     */
    private Long creatorId = 0L;

    /**
     * 创建时间
     */
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    private LocalDateTime creationTime;

    /**
     * 编辑用户
     */
    private Long modifierId = 0L;

    /**
     * 编辑时间
     */
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    private LocalDateTime modificationTime;

    /**
     * 是否启用
     */
    private boolean enabled = true;

    /**
     * 是否删除
     */
    private boolean deleted = false;

    /**
     * 用户组类型名称
     */
    private String userTypeName = "";

    /**
     * 用户组类型名称
     */
    private String accountTypeName = "";

    /**
     * 创建人名称
     */
    private String creatorName = "";

    /**
     * 编辑人名称
     */
    private String modifierName = "";
}
